# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pbscan
pkgver=10.566c3d7
pkgrel=2
pkgdesc='Faster and more efficient stateless SYN scanner and banner grabber due to userland TCP/IP stack usage.'
groups=('blackarch' 'blackarch-scanner')
arch=('x86_64' 'aarch64')
url='https://github.com/gvb84/pbscan'
license=('BSD')
depends=('openssl' 'libpcap')
makedepends=('git')
source=("git+https://github.com/gvb84/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  unset CFLAGS

  make -j1
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README CHANGELOG TODO \
    DEPENDENCIES VERSION
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

